<!DOCTYPE html>
<head>

    <title>弱电项目资质_安防产业资质服务在线服务平台_e井在线b2b电子商务平台官网</title>

    @include('web.layout.head')
    <link rel="stylesheet" href="{{mix('/css/web/product/product_allist.css')}}">
    <link rel="stylesheet" href="{{mix('/css/web/find/find.css')}}">
    <script src="{{mix('/js/web/index/scrollbar.js')}}"></script>
    <script src="{{mix('/js/web/frame/distpicker.js')}}"></script>
</head>
<style type="text/css">

</style>
<body>
@include('web.layout.header_proscenium')
@include('web.layout.main_header')
<div class="crumbs f-cb">
    <div class="w1200">
        <a href="/">首页</a> &gt;
        {{--<a  >所有商品</a> &gt;--}}
        @if($nav_cate['name']){{$nav_cate['name']}} &gt;@endif
        @if($cate_name)<a href="/product/product_list/{{$cate_id}}">{{$cate_name}}</a>@endif
    </div>
</div>
<div class="cateage">
    <div class="w1200">
        <ul class="check-c ovh">
            <li style="border-bottom: none; display: none;">
                <span>品牌：</span>
                <div class="right fr">

                    @if(count($brands)>10)
                    <div class="more">更多</div>
                    <div class="stop">收起</div>
                    @endif

                    @if(!empty($brands))
                        @foreach($brands as $k=> $b)
                            @if($k>8)
                                <div class="pp_hide">
                                    @endif
                                    <a rel="nofollow" href="javascript:;" class="gray_background product_brand cur" brand-id="{{$b['id']}}">
                                        <img src="{{$b['logo']}}">
                                        <div class="name" style="bottom: -47px;">{{$b['name']}}</div>
                                    </a>
                                    @if($k>8)
                                </div>
                            @endif
                        @endforeach
                    @endif

                </div>
            </li>
        </ul>

        <ul class="check-c ovh xxfl">
            <li style="border-bottom: none;">
                <span style="line-height: 40px;">资质选择：</span>
                <div class="right fr" style="padding-top:10px;">

                    @if(count($cates)>10)
                    <div class="more">更多</div>
                    <div class="stop">收起</div>
                    @endif

                    <a rel="nofollow" href="javascript:;" class="product_categories @if( !isset($search_params['third_cat'])) cur @endif" level-type="0" category-id="{{$cate_id}}" pid="0" first_id="0">全部</a>
                    <!-- 选择中class="cur" -->
                    @if(!empty($cates))
                        @foreach($cates as $k=>$v)
                            @if($k>8)
                                <div class="pp_hide">
                                    @endif
                            <a rel="nofollow" href="javascript:;" class="product_categories @if( isset($search_params['third_cat']) && $search_params['third_cat']==$v['id']) cur @endif"  pid="{{$v['pid']}}" first_id="{{$v['first_id']}}" level-type="{{$v['level_type']}}" category-id="{{$v['id']}}">{{$v['name']}}</a>
                                    @if($k>8)
                                </div>
                            @endif
                        @endforeach
                    @endif

                </div>
            </li>
            <li style="border-bottom: none;">
                <span style="line-height: 40px;">资质类别：</span>
                <div class="right fr" style="padding-top:10px;">
                    <a data-hidden="0" class="product_attrs @if( isset($search_params['attributes'][1][0]) && in_array('消防',$search_params['arri_arr'])) cur @endif" item-id="1057" attrs-id="159-1057"  key-id="159" key-name="资质类别"  href="javascript:;" rel="nofollow" >消防</a>
                    <a data-hidden="0" class="product_attrs @if( isset($search_params['attributes'][1][0]) && in_array('安防',$search_params['arri_arr'])) cur @endif" item-id="1058" attrs-id="159-1058"  key-id="159" key-name="资质类别"  href="javascript:;" rel="nofollow" >安防</a>
                    <a data-hidden="0" class="product_attrs @if( isset($search_params['attributes'][1][0]) && in_array('弱电智能化',$search_params['arri_arr'])) cur @endif" item-id="1059" attrs-id="159-1059"  key-id="159" key-name="资质类别"  href="javascript:;" rel="nofollow" >弱电智能化</a>

                    {{--@if(!empty($attrs))--}}
                        {{--@foreach($attrs as $k=>$v)--}}
                            {{--@if(!empty($v['values']) && $k==1)--}}
                                {{--@foreach($v['values'] as $kk=>  $vv)--}}
                                    {{--<a data-hidden="0" class="product_attrs @if( isset($search_params['attributes'][1][0]) && $search_params['attributes'][1][0]==$kk) cur @endif" item-id="{{$kk}}" attrs-id="{{$v['attribute_id']}}-{{$kk}}"  key-id="{{$v['attribute_id']}}" key-name="{{$v['name']}}"  href="javascript:;" rel="nofollow" >{{$vv}}</a>--}}
                                {{--@endforeach--}}
                            {{--@endif--}}
                            {{--@if($k > 3)--}}
                                {{--@break--}}
                            {{--@endif--}}
                        {{--@endforeach--}}
                    {{--@endif--}}
                </div>
            </li>

            <li style="border-bottom: none;">
                <span style="line-height: 40px;">资质等级：</span>
                <div class="right fr" style="padding-top:10px;">
                    @if(!empty($attrs))
                        @foreach($attrs as $k=>$v)
                            @if(!empty($v['values']) && $k==0)
                                @foreach($v['values'] as $kk=>  $vv)
                                    <a data-hidden="0" class="product_attrs2 @if( isset($search_params['arri_arr'])  && in_array($vv,$search_params['arri_arr']))) cur @endif" item-id="{{$kk}}" attrs-id="{{$v['attribute_id']}}-{{$kk}}"  key-id="{{$v['attribute_id']}}" key-name="{{$v['name']}}"  href="javascript:;" rel="nofollow" >{{$vv}}</a>
                                @endforeach
                            @endif
                            @if($k > 3)
                                @break
                            @endif
                        @endforeach
                    @endif
                </div>
            </li>
        </ul>
        <div class="clear"></div>
    </div>
</div>

<div class="cateage">
    <div class="w1200">
        <div class="chk">
            <ul class="ovh fl sort_order">
                <li class="rank bj-hr fir-wd"><a data-id="1"  old-order-id ="0" rel="nofollow">综合排序<em></em></a></li>
                <li class="rank" ><a data-id="4" old-order-id="" rel="nofollow">价格<em></em></a></li>
            </ul>
            <div class="jil-serch fl">
                <input class="txt-k fl" name="sprice" type="text" value="" placeholder="￥">
                <span class="fl">—</span>
                <input class="txt-k fl" name="eprice" type="text" value="" placeholder="￥">

                <input class="ti-jbt fl" type="button" value="确定">
            </div>
            <!--    <div class="fr bkx f-cb">
                  <div class="spage fr f-cb">
                      <a href="" rel="nofollow" class="fl lbtn"></a>
                      <p><span>1</span>/22</p>

                      <a href="" rel="nofollow" class="fr rbtn"></a>
                  </div>
                 <div class="total fr">
                      共 <span>2222</span> 个商品
                  </div>

              </div>-->

            <div class="clear"></div>

        </div>
    </div>
</div>
<div class="vessel fade out">
    <div class="w1200">

        <ul class="ptpd ovh" style="min-height: 500px;">
            @foreach($list as $key=>$value)
            <li>
                <a target="_blank" href="{{url('/shop/attribute')}}/{{$value['product']['shop_id']?$value['product']['shop_id']:1}}">
                    <img src="{{$value['product']['cover_image']}}" alt="">
                </a>
                <a target="_blank" href="{{url('/shop/attribute/')}}/{{$value['product']['shop_id']?$value['product']['shop_id']:1}}" class="txt-css">{{$value['product']['name']}}</a>
                <div class="cost">
                    <span class="fr">￥{{$value['price']}}</span>
                    <div class="goods_bottom">
                        <p class="security">{{$value['level']}}</p>
                        <img class="security_img" src="{{asset('/img/web/product/niu.jpg')}}" style="cursor:pointer;" id="contact" data-sp="{{$value['product']['shop_id']}}" alt="">
                    </div>
                </div>
            </li>
            @endforeach
            {{--<li>--}}
                {{--<a target="_blank" href="">--}}
                    {{--<img src="{{asset('/img/web/product/video1.jpg')}}" alt="">--}}
                {{--</a>--}}
                {{--<a target="_blank" href="" class="txt-css">银江股份有限公司 舞台灯光设计、安装、调试资质三级</a>--}}
                {{--<div class="cost">--}}
                    {{--<span class="fr">￥1300.00</span>--}}
                    {{--<div class="goods_bottom">--}}
                        {{--<p class="security">安防</p>--}}
                        {{--<img class="security_img" src="{{asset('/img/web/product/niu.jpg')}}" alt="">--}}
                    {{--</div>--}}
                {{--</div>--}}
            {{--</li>--}}
        </ul>
        <div class="clear"></div>
        <div class="page">
            @include('web.common.paginate', ['page' => $page])

        </div>
    </div>
</div>

@include('web.layout.footer')
<script type="text/javascript">


    var jud = '{{ Session::get("user_id")}}';

    //关注商品
    $(".follow").click(function () {
        if (jud == '' || jud == '0') {
            layer.confirm('请先登录后再关注商品，点击【确认】跳转到登录页面', {
                title: '温馨提示',
                btn: ['确认', '取消'] //可以无限个按钮
            }, function (index) {
                window.location.href = AJAX_URL + '/user/login';
            }, function (index, layero) {
                layer.close(index);
            });
            return false;

        } else {

            if ($(this).html().indexOf('已关注')>=0){
                layer.alert('您已成功关注该商品');
            }else {
                var pid =  $(this).attr("data-pid");
                var sku_id = $(this).attr("data-sku_id");
                var shop_id =  $(this).attr("data-shop_id");

                var token = "{{csrf_token()}}";
                $.ajax({
                    url: '/product/collection',
                    type: 'GET',
                    dataType: 'json',
                    data: {'product_id': pid, '_token': token, 'type': 'product', 'sku_id': sku_id, 'shop_id': shop_id},
                    success: function (data) {
                        if (data.code == 0) {
                            layer.alert('已成功关注该商品');
                            $('#atten_'+sku_id).html('已关注');
                            $('#nofimg_'+sku_id).hide();
                            $('#fimg_'+sku_id).show();
                        } else {
                            layer.alert('商品关注失败');
                        }
                    }

                })
            }
        }
    });
    //关注商品结束


    var new_product_data =<?php echo !empty($search_params)?json_encode($search_params):'{}'?>;;
    var category_id = {{$cate_id}};
    $(".sort_order li").each(function(index, el) {
        var data_id = $(this).find('a').attr('data-id');
        var old_data_id = $(this).find('a').attr('old-order-id');
        if(new_product_data.order){
            $(this).removeClass('bj-hr ad-bk');
            if(data_id==new_product_data.order){
                $(this).addClass('bj-hr ad-bk');
            }
            if(old_data_id==6){
                $(this).addClass('bj-hr ad-bk');
            }
        }else{
            if(data_id==1){
                $(this).addClass('bj-hr ad-bk');
            }
        }
    });
    // 排序
    $(".rank a").on('click', function(event) {
        event.preventDefault();
        /* Act on the event */
        var order = $(this).attr('data-id');
        var old_order = $(this).attr('old-order-id');
        if(5==old_order){
            order = 6;
        }
        if(6==old_order){
            order = 5;
        }
        new_product_data.order = order;
        _ajxa_list();
    });
    //高级选项删除
    $(".pro .icon-btn-x").click(function(event) {
        /* Act on the event */
        var key = $(this).attr('key-id');
        new_product_data.attrs_data[key] ={};
        _ajxa_list();
        // new_product_data.attrs_data.remove(key);
        // console.log(new_product_data);
    });

    $('.product_brand').hover(function () {
        $(this).find('.name').stop().animate({bottom: '0'})
    }, function () {
        $(this).find('.name').stop().animate({bottom: '-47px'})
    });

    //品牌
    $(".product_brand").click(function(event) {
        /* Act on the event */
        var brand_id = $(this).attr('brand-id');
        var brand_name = $(this).find('div.name').text();
        //new_product_data.brand_data={'id':brand_id,'name':brand_name}
        new_product_data.brand_id=brand_id;
        _ajxa_list();
        // console.log(new_product_data);
    });
    //分类
    $(".product_categories").click(function(event) {
        /* Act on the event */
        var pid = $(this).attr('pid');
        var first_id = $(this).attr('first_id');
        var category_ids = $(this).attr('category-id');
        var category_name = $(this).text();
        if(pid ==first_id){
            category_id = category_ids;
            new_product_data.categories_data={};
        }else{
            new_product_data.categories_data={'id':category_ids,'name':category_name};
        }
        _ajxa_list();
    });
    //资质类别选项
    $(".product_attrs").click(function(event) {
        $(this).toggleClass('cur');
        /* Act on the event */
        var attrs_id = $(this).attr('attrs-id');
        var key = $(this).attr('key-id');
        var item_id = $(this).attr('item-id');
        var key_name = $(this).attr('key-name');
        var attrs_name = $(this).text();
        if(!new_product_data.attrs_data || new_product_data.attrs_data.length<=0){

            new_product_data.attrs_data={};
        }
//        new_product_data.attrs_data[key] ={'item_id':item_id,'id':attrs_id,'name':attrs_name,'key_name':key_name};
        new_product_data.attrs_data = key+":"+key_name+","+item_id+":"+attrs_name ;
        _ajxa_list();
    });

    //资质等级选项
    $(".product_attrs2").click(function(event) {
        $(this).toggleClass('cur');
        /* Act on the event */
        var attrs_id = $(this).attr('attrs-id');
        var key = $(this).attr('key-id');
        var item_id = $(this).attr('item-id');
        var key_name = $(this).attr('key-name');
        var attrs_name = $(this).text();
        if(!new_product_data.attrs_data2 || new_product_data.attrs_data2.length<=0){

            new_product_data.attrs_data2={};
        }
        new_product_data.attrs_data2 = key+":"+key_name+","+item_id+":"+attrs_name ;
        _ajxa_list();
    });
    function _ajxa_list() {
        location.href = '/product/product_list/'+category_id+'?'+ $.param(new_product_data);
    }


    //关注商品
    var jud = '{{ Session::get("user_id")}}';



</script>
<script type="text/javascript">
    $(function(){
        var index = 0 ;

        $('.more').click(function () {
            $('.pp_hide').show();
            $('.more').hide();
            $('.stop').show();
        });
        $('.stop').click(function () {
            $('.pp_hide').hide();
            $('.stop').hide();
            $('.more').show();
        });

        $('.mo-d').click(function () {
            if ($(this).hasClass('cur')) {
                $('.check-c li').slice(2).addClass('yc-ys');
                $('.mo-d').text('展开选项');
                $('.check-c li:eq(1)').css({"borderBottom": "none"});
                $(this).removeClass('cur');
            } else {
                $('.check-c li').slice(2).removeClass('yc-ys');
                $(this).text('收起选项');
                $('.check-c li:eq(1)').css({"borderBottom": "1px solid #D7D7D7"});
                $(this).addClass('cur');
            }
        });

        $('.chk li').click(function () {      //|| $(this).index() == $('.chk li:last').index()
            $(this).addClass('bj-hr ad-bk').siblings('li').removeClass('bj-hr ad-bk');
            if ($(this).index() == 0) {
                $(this).css({"borderLeft": "none"});
            } else if ($(this).index() == $('.chk li:last').index()) {
                $(this).css({"borderRight": "none"});
            } else if ($(this).index() == 1) {
                $('.fir-wd').css({"borderRight": "none"});
            }
        });

        $('.fir-wd ~ li').css({"width": 74});

        $('.ptpd li').eq(4).css({"marginRight": 0});
        $('.ptpd li').eq(9).css({"marginRight": 0});
        $('.ptpd li').eq(14).css({"marginRight": 0});
        $('.ptpd li').eq(19).css({"marginRight": 0});


        //清除评价下边框
        $('.store li:last').css({"borderBottom": "none"});

        //为面包屑添加class
        // $(".crumbs a").slice(4).addClass('list');

        //给属性的 全部 选项  添加url;
        $(".allCheck").each(function (k, v) {
            //添加焦点
            var i = 0;
            var parent = $(this).siblings();
            parent.each(function (k2, v2) {
                if ($(this).hasClass('cur')) {
                    i = 1;
                }
            })
            //alert(i);
            if (i == 0) {
                $(this).addClass('cur');
            }
            //添加url
            var id = $(this).data('id');
            var url = $('#atNum-' + id).attr('href');
            $(this).attr('href', url);

        });

        $('.magnifier').keydown(function(e){
            if(e.keyCode==13){

            }
        });

        //价格搜索
        $('.jil-serch .ti-jbt').click(function () {
            var priceUrl = '/product/product_list/{{$cate_id}}?';
            var priceUrl = priceUrl.replace(/&amp;/g,'&');
            var sprice = $("[name='sprice']").val();
            var eprice = $("[name='eprice']").val();
            var priceUrl = priceUrl + '&price[start]=' + sprice + '&price[end]=' + eprice;
            if (sprice && eprice) {
                if (isNaN(sprice) || isNaN(eprice)) {
                    layer.alert('数据格式不正确', {icon: 2});
                } else {
                    window.location.href = priceUrl;
                }
            } else {
                layer.alert('请填写正确的价格范围', {icon: 2});
            }
        })

    })
</script>
<script type="text/javascript">
    $(function(){
        new ImitateScroll("scrollBox1", "scrollObj1", "scrollBar1", "scrollBtn1");
        $(".check_new li").mouseover(function(){
            $(this).find(".selectnewtan").show();
            $('.selectnewtan01').css('visibility', 'hidden');
            $('.selectnewtan01').css('z-index', '-1');
            $(this).siblings().find(".selectnewtan").hide();
            var index=$(this).index();
            $(".check_new li").eq(0).find(".selectnewtan").css("left","0px");
            // $(this).find(".name").val()
            $(".selectnewtan").mouseout(function(){
                $(this).hide();

            })
        })
        $(".check_new li").mouseout(function(){
            $(".selectnewtan").hide();
        })
        $(".selectnewtan a").click(function(){
            $(".selectnewtan").hide();
            // console.log($(this).text());
            // $(this).parents(".leival").find(".name").text($(this).text());

        })
        $(".li_more").mouseover(function(){
            $(".selectnewtan").hide();
            $('.selectnewtan01').css('visibility', 'visible');
            $('.selectnewtan01').css('z-index', '3');
        })
        $(".alllist_gbi").click(function(){
            $(".selectnewtan").hide();
            $('.selectnewtan01').css('visibility', 'hidden');
            $('.selectnewtan01').css('z-index', '-1');
        })
        $(".li_more").mouseout(function(){
            $('.selectnewtan01').css('visibility', 'hidden');
            $('.selectnewtan01').css('z-index', '-1');
        })

    })
    /* 增加 点击更过事件 */
    $(document).ready(function () {
        @if( isset($search_params['third_cat']))
            $('.more').trigger('click');
        @endif
    });
</script>


</body>
</html>